# name : rpact getSampleSizeSurvival median
# key : rpact.getSampleSizeSurvival.median.all
# contributor: Shuguang Sun
# --
${1:sz1} <- getSampleSizeSurvival(
  alpha = ${2:0.025}, sided = 1,
  beta = ${3:0.1},
  median1 = ${4:log(2) / 10}, # Treatment
  median2 = ${5:log(2) / 7},  # Reference
  hazardRatio = NA_real_,
  followUpTime = ${6:28},
  accrualIntensity = ${7:8.3},
  accrualTime = 0,
  allocationRatioPlanned = ${8:1},
  dropoutRate1 = 0.01,
  dropoutRate2 = 0.05,
  dropoutTime = 12
)

sz2 <- getSampleSizeSurvival(
  alpha = $2, sided = 1,
  beta = $3,
  median1 = $4,
  median2 = $5,
  hazardRatio = NA_real_,
  accrualTime = 0,
  accrualIntensity = $7,
  maxNumberOfSubjects = 2 * ceiling($1$eventsFixed / ${9:eventratio} / 2),
  allocationRatioPlanned = $8,
  dropoutRate1 = 0.01,
  dropoutRate2 = 0.05,
  dropoutTime = 12
)
